package ch.bfh.ti.pixelator.camera;

import android.app.Fragment;
import android.content.Intent;
import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
import android.view.View.OnClickListener;
import android.view.ViewGroup;
import android.widget.ImageButton;
import ch.bfh.ti.pixelator.R;

public class ReceiveFragment extends Fragment {

	@Override
	public View onCreateView(LayoutInflater inflater, ViewGroup container,
			Bundle savedInstanceState) {
		View rootView = inflater.inflate(R.layout.fragment_main_receive,
				container, false);

		ImageButton openCamera = (ImageButton) rootView
				.findViewById(R.id.button_open_camera);
		openCamera.setOnClickListener(new OnClickListener() {

			@Override
			public void onClick(View v) {
				Intent i = new Intent(getActivity(), CameraActivity.class);
				startActivity(i);
			}
		});

		return rootView;
	}

}